package com.moorror.codegenvel.common.tree.actions;

import com.moorror.codegenvel.common.tree.MTTreeCell;
import com.moorror.codegenvel.common.tree.TreePanelMark;
import com.moorror.codegenvel.utils.GuiUtils;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;

/**
 * @Author jiyanghuang
 * @Date 2024/4/11 23:09
 */
public class DeleteRightContentSqliteAction extends AbstractMTTreeCellSelectTreeAction {

    public DeleteRightContentSqliteAction(TreePanelMark treePanelMark) {
        super("DeleteInvokeTreeFromSqlite", "delete invoke tree from sqlte", GuiUtils.D_SQLITE, treePanelMark);
    }

    public DeleteRightContentSqliteAction(TreePanelMark treePanelMark, @Nullable String text, @Nullable String description) {
        super(text, description, GuiUtils.D_SQLITE, treePanelMark);
    }

    public DeleteRightContentSqliteAction(TreePanelMark treePanelMark, @Nullable String text, @Nullable String description, Icon icon) {
        super(text, description, icon, treePanelMark);
    }

    @Override
    public void handleSelectTree(DefaultMutableTreeNode mutableTreeNode, MTTreeCell mtTreeCell) {
        mtTreeCell.deleteRightContentFromSqlite(mutableTreeNode, treePanelMark);
    }
}
